<?php declare(strict_types=1);

namespace Zyucv7\Core\Router;

use Exception;

class RouterException
{
    /**
     * 路由找不到
     *
     * @param string $route
     * @return Exception
     */
    public static function notFound(string $route): Exception
    {
        return self::message("{$route} not found.");
    }

    /**
     * 路由异常信息
     *
     * @param string $route
     * @return Exception
     */
    public static function message(string $message): Exception
    {
        return new Exception("Router Exception:  {$message}");
    }
}